Volumes (i.e., volumetric objects) are often used in computer animation to represent a distribution of particles in three-dimensional space. Volumes may be used to represent, for example, dust, smoke, and fire. Typically, volumes comprise a plurality of voxels (volumetric elements) arranged in a 3D grid. A volume in a scene may be defined by the bounds of the volume (e.g., using a 3D surface), the characteristics of voxels comprising the volume, and the positional distribution of voxels.
Scenes with volumes may pose a challenge to rendering engines. For example, a part of the volume closer to a virtual camera may restrict light travelling from a part of the volume farther from the camera. In addition, parts of the volume may be illuminated to differing extents depending on the position of light sources. Further, the volume may be heterogeneous; for example, different parts of the volume may have different transmissivity and scattering characteristics. Rendering engines may need to take these factors in account to produce a realistic image.
Scenes with multiple volumes may be particularly challenging. For example, one volume may appear behind another, or two or more volumes may overlap in space. Thus, some rendering engines may need to keep all volumes in a scene in memory simultaneously. In addition, some rendering engines may need to fully re-render the scene if any modifications are made to light sources. These problems are magnified in graphical processing unit (GPU) based rendering engines, where the available amount and bandwidth of memory may be limited.
Therefore, it is desirable to provide a method and system for the rendering of multiple volumes in an efficient manner.